package serova.valeriya.electricity;

public enum ApplicationMode {
	BILL_MODE(new BillMaker()),
	REPORT_MODE(new ReportMaker()),
	REGESTRATION_MODE(new Registrator());
	
	private Worker worker;
	
	ApplicationMode(Worker worker) {
		setWorker(worker);
	}
	
	public boolean isReady() {
		return getWorker().isReady();
	}

	public Worker getWorker() {
		return worker;
	}

	private void setWorker(Worker worker) {
		this.worker = worker;
	}

}
